#{extends '/template/main.html' /}
<!-- Removing search and results count filter -->
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">课程订单</h3>
    </div>
    <div class="panel-body">
        <table class="table table-bordered table-striped" id="example-2">
            <thead>
            <tr>
                <th>课程名称</th>
                <th>开始时间</th>
                <th>结束时间</th>
                <th>课程数量</th>
                <th>剩余数量</th>
                <th>课程类别</th>
                <th>订单号</th>
                <th>订单金额</th>
                <th>课程数量操作</th>
            </tr>
            </thead>

            <tbody class="middle-align">
            #{list webUserCurriculumList , as:'curriculum'}
            <tr>

                <td>${curriculum?.curriculum?.curriculumName}</td>
                <td>${curriculum?.startTime}</td>
                <td>${curriculum?.endTime}</td>
                <td>${curriculum?.quantity}</td>
                <td><span style="color:#ff0c19;cursor:pointer;">${curriculum?.residueNum}</span></td>
                <td>${curriculum?.curriculum?.curriculumType?.typeName}</td>
                <td>${curriculum?.order?.orderNumber}</td>
                <td>${curriculum?.order?.paymentedAmount}</td>
                <td>
                    <a href="#" onclick="operateSureModel('${curriculum?.id}',0)" class="btn btn-secondary btn-sm btn-icon icon-left">
                        减少一次
                    </a>
                    <a href="#" onclick="operateSureModel('${curriculum?.id}',1)" class="btn btn-secondary btn-sm btn-icon icon-left">
                        增加一次
                    </a>

                </td>
            </tr>
            #{/list}
            </tbody>
        </table>
        *{<div id="layerPage" class="col-xs-12"></div>}*
    </div>
</div>



<!-- Imported styles on this page -->
<link rel="stylesheet" href="/public/js/datatables/dataTables.bootstrap.css">

<script src="/public/js/datatables/js/jquery.dataTables.min.js"></script>


<!-- Imported scripts on this page -->
<script src="/public/js/datatables/dataTables.bootstrap.js"></script>
<script src="/public/js/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
<script src="/public/js/datatables/tabletools/dataTables.tableTools.min.js"></script>

<script type="text/javascript" src="/public/laypage/laypage.js"></script>
<script type="text/javascript">
    var id = '${id}';
    $(function () {
        // 提示
        var msg = '${flash.get("msg")}';
        if(msg) {
            saveSuccess(msg);
        }

    })

    //确定减少课程
    function sureOperate() {
        var curriculumId = $('#entity_id').val();
        var addOrminus = $('#id_add_or_minus').val();
        window.location.href='/BS0008/admin/minusCurriculumNum/'+curriculumId+'/'+addOrminus+"/"+id;

    }

</script>


